/*
 * @description:
 * @author: cuicui
 * @Date: 2023-11-25 12:30:44
 * @LastEditTime: 2023-11-29 22:53:56
 * @LastEditors: cuicui
 */
// with polyfills
import 'core-js/stable'
import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import i18n from './locales'
import { VueAxios } from './utils/request'
import BusinessLayout from '@/business-components/business-layout'
import * as echarts from 'echarts';
import ProLayout, { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
import themePluginConfig from '../config/themePluginConfig'
// Cron
import CronInput from 'antv-cron'
import 'antv-cron/lib/antv-cron.css'
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)

import bootstrap from './core/bootstrap'
import './core/lazy_use' // use lazy load components
import './permission' // permission control
import './utils/filter' // global filter
import './global.less' // global style
import echarts_theme from '../config/echarts_theme.json'

// echarts主题
echarts.registerTheme('custom', echarts_theme)
Vue.prototype.$echarts = echarts
Vue.config.productionTip = false
// Vue.prototype.$video = Video

// mount axios to `Vue.$http` and `this.$http`
Vue.use(VueAxios)
Vue.use(CronInput)
// use pro-layout components
Vue.component('pro-layout', ProLayout)
Vue.component('page-container', PageHeaderWrapper)
Vue.component('page-header-wrapper', PageHeaderWrapper)
Vue.component('business-layout', BusinessLayout)

window.umi_plugin_ant_themeVar = themePluginConfig.theme

new Vue({
  router,
  store,
  i18n,
  // init localstorage, vuex, Logo message
  created: bootstrap,
  render: h => h(App)
}).$mount('#app')
